package com.data;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class SQLDataAccess {

	private DbConnectionManager connPool;

	public SQLDataAccess(DbConnectionManager dbConn){
		connPool = dbConn;
	}

	public void addLifterType(String lifterType){
		Connection conn = connPool.getConnection();
		String sql = "INSERT INTO lifterTypes(name) VALUES (?)";
		try {
			PreparedStatement prepState = conn.prepareStatement(sql);
			prepState.setString(1, lifterType);
			prepState.executeUpdate();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		connPool.returnConnection(conn);
		
	}

	public void addCountry(String country){

	}

	public void addCity(String city){

	}

	public void addUser(String email,String password,String fName,String lName,
			char gender,int age, String lifterType, String country, String city){

	}

	public void sendMatchRequest(String sender, String receiver, String message){

	}

	public void addMatch(String receiver,String sender){

	}

	public void addQuestion(String question){

	}

	public void addQuestionAnswer(String userEmail, int answer, int questionId){

	}

}
